<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <title>Thymeleaf tutorial - Exercise 12: forms</title>
        <link rel="stylesheet" href="../../../css/main-static.css" th:href="@{/css/main.css}" />
        <meta charset="utf-8" />
    </head>
    <body>
        <p>
            This exercise introduces concepts from
            <a href="http://www.thymeleaf.org/doc/html/Using-Thymeleaf.html#expressions-on-selections-asterisk-syntax"
               title="Open Thymeleaf manual" target="_blank">chapter 4 - section 3 of the Using Thymeleaf</a>
            manual.
        </p>
        <ol>
            <li>
                A bean of class 
                <a href="../../code/Customer.java" th:href="@{/resources/code/Customer.java}" target="_blank"><kbd>Customer</kbd></a> 
                has been set into the context model with variable name <b>customer</b>.
                This is a complex bean, containing properties of the
                <a href="../../code/Gender.java" th:href="@{/resources/code/Gender.java}" target="_blank"><kbd>Gender</kbd></a> and
                <a href="../../code/PaymentMethod.java" th:href="@{/resources/code/PaymentMethod.java}" target="_blank"><kbd>PaymentMethod</kbd></a>
                enum types.
            </li>
            <li>
                Edit the source code  in order to bind bean fields into form fields.
                You have to use <kbd>th:object</kbd> and <kbd>th:field</kbd> attributes. <br />
                As this exercise is more complex than previous ones, some hints have been written 
                as HTML comments inside the template.
            </li>
            <li>
                You can check the proposed solution by pressing the <b>Show solution</b> button.
            </li>
        </ol>
    </body>
</html>
